package com.polaris.live.popup.party

import android.content.Context
import com.lxj.xpopup.XPopup
import com.lxj.xpopup.core.BottomPopupView
import com.polaris.live.R
import com.polaris.live.databinding.PopupMembershipFeeExplanationBinding

/**
 * 成员费说明
 *
 * @author Created by 天晴 on 2024/10/15 19:18
 * @since 1.0.0
 **/
class MembershipFeeExplanationPopup(
    context: Context,
) : BottomPopupView(context) {

    private lateinit var mBinding: PopupMembershipFeeExplanationBinding
    override fun getImplLayoutId(): Int {
        return R.layout.popup_membership_fee_explanation
    }

    override fun onCreate() {
        super.onCreate()
        mBinding = PopupMembershipFeeExplanationBinding.bind(popupImplView)
        mBinding.btnClose.setOnClickListener {
            dismiss()
        }
    }

    companion object {

        fun show(
            context: Context,
        ) {
            XPopup.Builder(context)
                .isViewMode(false)
                .hasNavigationBar(false)
                .hasShadowBg(true)
                .isDestroyOnDismiss(true)
                .asCustom(MembershipFeeExplanationPopup(context))
                .show()
        }
    }
}